<?php

//Teste l'interaction avec la bdd

require_once('utils.php');
require_once('constantes.php');
//require_once('../fct_dao_marie.php');
//require_once('../fct_dao_invite.php');
//require_once('../fct_dao_livreor.php');
//require_once('../commons_rules.php');
//require_once('../commons_atom.php');

//var_dump(isTelephoneFr('+33125487963'));
//var_dump(isTelephoneFr('0125487963'));
//
//var_dump(str_replace(' ', '', trim('01 25 48 79 63')));
//var_dump(isTelephoneFr('01 25 48 79 63'));
//var_dump(isTelephoneFr('+33 1 25 48 79 63'));

//var_dump(hash('md5', 'notremariage'));
//http_redirect
//	(getCurrentBaseUrl().'/index.php'
//	,array
//		('idOnglet'	=> $idOnglet
//		)
//	,false
//	,HTTP_REDIRECT_PERM
//	);
var_dump(getCurrentBaseUrl().'/index.php');

//Création d'un cookie
//$created = createCookieApp(COOKIE_APP_NAME, 1);
//var_dump($created);

//list( $msecs, $uts ) = explode( ' ', microtime());
//echo microtime();
//echo "<br />";
//echo $uts;
//echo "<br />";
//echo round($msecs * 1000);
//echo "<br />";
//echo floor(($uts+$msecs)*1000);
//error_log('test');
//var_dump(getDateToPrint() . ' - ' . getLogByLevel(LVL_FATAL) . ' : ');
//
//$values = getValueFromDBForCookie();
//var_dump($values);
//$dateMariage = $values['DATE_MARIAGE'];
//$time = strtotime($dateMariage);
//var_dump(date('Y', $time));
//var_dump(date('m', $time));
//var_dump(date('d', $time));

//var_dump(getCookieAppValue(COOKIE_APP_NAME, 1));

//var_dump($_COOKIE);
//echo $_COOKIE[COOKIE_APP_NAME.'_'.$_SERVER['SERVER_NAME']];

//$t = array(htmlentities('éàèùêïâôûç&', ENT_NOQUOTES, 'UTF-8',false));
//var_dump(htmlentities($t, ENT_NOQUOTES, 'UTF-8',false));
//var_dump(array_map(htmlDecode, array()));

//setcookie('COOKIE_TEST', 'Ceci est un cookie test', time() + 120, null, $_SERVER['SERVER_NAME']);
//setcookie('COOKIE_TEST_'.$_SERVER['SERVER_NAME'], 'Ceci est un cookie test', time() + 120, null, '', false, true);
//var_dump($_COOKIE);
